package com.ddyx.rest;

import javax.annotation.Resource;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.mapper.GoodsCategoryMapper;
import com.ddyx.service.GoodsCategoryService;
import com.ddyx.util.ResponseForm;

@Controller
@RequestMapping("/category")
public class GoodsCategoryController {
	
	@Resource
	GoodsCategoryService gcService;
	
	@RequestMapping("/getCategory")
	@ResponseBody
	public ResponseForm getCategory(@Param(value = "categoryId") Integer categoryId) {
		return gcService.getCategory(categoryId);
	}
	
	@RequestMapping("/getCategoryById")
	@ResponseBody
	public ResponseForm getCategoryById(@Param(value = "categoryId") Integer categoryId) {
		return gcService.getCategoryById(categoryId);
	}
	
	
}
